package com.yc.boot.work.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * Create with IntelliT IDEA
 *
 * @Author: zhengmingzhe
 * @Date: 2021/12/14/13:49
 * @Description: 教师学生关联实体类
 */
//数据库里面运用了关联主键 就是多个关联的字段里只允许部分重复，不能全部重复，然后在实体类里把一个字段设置为手动INPUT
@Data
@Accessors(chain = true)
@TableName("test_teacher_student")
public class TestTeacherStudent {
    @TableId(value = "teacher_id", type = IdType.INPUT)
    @ApiModelProperty(value = "班级Id")
    private Long teacherId;

    @TableField("student_id")
    @ApiModelProperty(value = "教师Id")
    private Long studentId;
}
